#pragma once
#include <iostream>
#define VERTEX 5
using graph_vector = struct
{
	int data[VERTEX] = { 0 };
	int vector[VERTEX][VERTEX];
};

void init_graph(graph_vector* g)
{
	for (int i = 0; i < VERTEX; i++)
	{
		for (int j = 0; j < VERTEX; j++)
		{
			g->vector[i][j] = 0;
		}
	}
}

void insert_edge(graph_vector* g, int start, int end)
{
	g->vector[start][end] = 1;
	g->vector[end][start] = 1;
}

bool is_adjacent(graph_vector* g, int start, int end)
{
	if (g->vector[start][end] == 1)
		return true;
	else
		return false;
}

void show_graph(graph_vector* g)
{
	for (int i = 0; i < VERTEX; i++)
	{
		for (int j = 0; j < VERTEX; j++)
		{
			std::cout << g->vector[i][j] << " ";
		}
		std::cout << std::endl;
	}
}

void delete_edge(graph_vector* g, int start, int end)
{
	g->vector[start][end] = 0;
	g->vector[end][start] = 0;
}